Video output components provide functions for finding other components associated with them. This section describes these functions.
To find any sound output components associated with a video output component, call the QTVideoOutputGetIndSoundOutput function.
To find a clock component associated with a video output component, call the QTVideoOutputGetClock function.
If a video output component supports the optional QTVideoOutputGetClock function, your software can call the function to get a pointer to the clock component associated with the video output component.
pascal ComponentResult QTVideoOutputGetClock (
QTVideoOutputComponent vo,
ComponentInstance *clock);
Your software can use the clock component returned by the QTVideoOutputGetClock function to synchronize video and sound for a movie to the rate of the display. To associate the instance of the clock component with a movie, call the SetMovieMasterClock function.
Because a change to the display mode could affect a clock component, your software should call QTVideoOutputGetClock only between calls to QTVideoOutputBegin and QTVideoOutputEnd , when it is not possible to change the display mode.
When your software calls the QTVideoOutputEnd function, the video output component disposes of the instance of the clock component returned by the QTVideoOutputGetClock function. Because of this, software that uses the clock to control a movie must reset the clock for the movie to the default clock (by calling SetMovieMasterClock with nil as the value of the clock component) before calling QTVideoOutputEnd .
If a video output component supports the optional QTVideoOutputGetIndSoundOutput function, your software can call the function to determine which sound output components are associated with the video output component.
pascal ComponentResult QTVideoOutputGetIndSoundOutput (
QTVideoOutputComponent vo,
long index,
Component *outputComponent);
| Previous | Chapter Contents | Chapter Top | Next |